
uniform sampler2D screenTexture;

void main(void)
{
	vec2 UV = vec2(gl_TexCoord[0].x/800.0, (1-gl_TexCoord[0].y/600.0));
	gl_FragColor = texture(screenTexture, UV);
	int i, j;
	float len = length(gl_FragColor.rgb);
	

	if(len >= 0){
		for(i = -1; i <= 1; i++){
			for(j = -1; j <= 1; j++){
				vec4 val = texture(screenTexture, UV+vec2(i*0.0125*0.25,j*0.017*0.25));
				float len2 = length(val.rgb);
				if(len2 >= 0.05){
					gl_FragColor += val*0.015*len2;
				}
			}
		}
	}
	
	
	
}
    